﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using RRTWSEntityDSD.Dominio;
using System.ServiceModel.Web;

namespace RRTWSEntityDSD.ServiceEntidad.WFCServiceREST
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IWCFEventoService" in both code and config file together.
    [ServiceContract]
    public interface IWCFEventoService
    {
        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "Eventos", ResponseFormat = WebMessageFormat.Json)]
        EventoDeportivo crearEvento(EventoDeportivo eventoACrear);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Eventos/{codigo}", ResponseFormat = WebMessageFormat.Json)]
        EventoDeportivo getEvento(string codigo);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Eventos/Contenido/{idContenidoWeb}", ResponseFormat = WebMessageFormat.Json)]
        EventoDeportivo getEventoPorContenido(string idContenidoWeb);

        [OperationContract]
        [WebInvoke(Method = "PUT", UriTemplate = "Eventos", ResponseFormat = WebMessageFormat.Json)]
        EventoDeportivo modificarEvento(EventoDeportivo eventoAModificar);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Eventos/Ultimos/{limite}", ResponseFormat = WebMessageFormat.Json)]
        List<EventoDeportivo> getListarUltimosEventos(string limite);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Eventos", ResponseFormat = WebMessageFormat.Json)]
        List<EventoDeportivo> getListarEventos();

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Eventos/{evento}/Cliente/{cliente}", ResponseFormat = WebMessageFormat.Json)]
        int cantidadEntradasCompradasPorClientePorEvento(string cliente, string evento);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Eventos/Operacion/{idOperacion}", ResponseFormat = WebMessageFormat.Json)]
        EventoDeportivo getEventoxOperacion(string idOperacion);

    }
}
